<?php
/**
 * XIE--Scorpion
 *
 * 职位操作
 * 
 */
namespace App\Models\Admin;

use DB,Session,Redirect;
use Illuminate\Database\Eloquent\Model;

class Position extends Model
{
    
    protected $table = 'position';
    public $timestamps = false;

    /*
     *职位列表
     */
    static function posits()
    {

        
    	$posits=DB::table('position')->get();
        

    	return $posits;

    }
    
    /*
     *添加
     */
    static function positAdd($arr)
    {
        $res=DB::table('position')->insert($arr);

        return $res;
    }
    
    /*
     *
     */
    static function updateRow($id,$v,$zd)
    {
        $res=DB::table('position')->where('position_id',$id)->update(array($zd=>$v));

        return $res;
    }

    static function deleteRow($id)
    {
        $res=DB::table('position')->where('position_id',$id)->delete();

        return $res;
    }


}